
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.logging.Level;
import java.util.logging.Logger;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
public class Status implements Runnable{
    private ThreadPoolExecutor exec;
    
    Status(ExecutorService exec) {
        this.exec = (ThreadPoolExecutor)exec;
    }
    
    public void run() {
        try {
            while(true) {
                System.out.println(exec.getActiveCount() + " clients is alive now");
                Thread.sleep(1000);
            }
        } catch (InterruptedException ex) {
            System.out.println("Daemon out");;
        }
    }
}
